
using System;
using System.Linq;
using Csla;
using Csla.Data;
using Csla.Security;
using Csla.Validation;

namespace HousingInfo.Library
{ 
	public partial class NewsBO : Csla.BusinessBase<NewsBO>
	{

		#region Authorization Rules
		protected override void AddAuthorizationRules()
		{
			//TODO: Define authorization rules in NewsBO
			//AuthorizationRules.AllowRead(NewsIDProperty, "NewsBOReadGroup");
			//AuthorizationRules.AllowRead(CategoryIDProperty, "NewsBOReadGroup");
			//AuthorizationRules.AllowRead(TitleProperty, "NewsBOReadGroup");
			//AuthorizationRules.AllowRead(NewsContentProperty, "NewsBOReadGroup");
			//AuthorizationRules.AllowRead(CreatedDateProperty, "NewsBOReadGroup");
			//AuthorizationRules.AllowRead(UrlImageProperty, "NewsBOReadGroup");

			//AuthorizationRules.AllowWrite(CategoryIDProperty, "NewsBOWriteGroup");
			//AuthorizationRules.AllowWrite(TitleProperty, "NewsBOWriteGroup");
			//AuthorizationRules.AllowWrite(NewsContentProperty, "NewsBOWriteGroup");
			//AuthorizationRules.AllowWrite(CreatedDateProperty, "NewsBOWriteGroup");
			//AuthorizationRules.AllowWrite(UrlImageProperty, "NewsBOWriteGroup");
		}

		protected static void AddObjectAuthorizationRules()
		{
			//TODO: Define object-level authorization rules of NewsBO
			//AuthorizationRules.AllowCreate(typeof(NewsBO), "NewsBOCreateGroup"));
			//AuthorizationRules.AllowEdit(typeof(NewsBO), "NewsBOEditGroup"));
			//AuthorizationRules.AllowDelete(typeof(NewsBO), "NewsBODeleteGroup"));
		}
		#endregion //Authorization Rules
		private void AssignParentKey(HousingInfo.DataLinQ.New data)
		{
			 //data.ParentId = ReadProperty<ParentBO>(ParentBOProperty).Id;
		}

	}
}
